#include "stm32f10x.h"
#include "main.h"

void system_Init()
{
     USART1_Config();    
     OLED_Init();
     Delay_Init();
     SBUS_Configuration();  //sbus
     IIC_GPIO_Init();
     MPU6050_Init();
	 PWM_Init();
	 Encoder_Init();

	//Brushless_motor_Init();
     //OLED_show();
     //test();
	Delay_ms(2000);
	//Moto_Pwm(1000,1000,1000,1000);
}

void OLED_show()
{
     OLED_ShowString(1,1,"C1");
     OLED_ShowString(2,1,"C2");
     OLED_ShowString(3,1,"C3");
     OLED_ShowString(4,1,"C4");
     OLED_ShowString(1,9,"C5");
     OLED_ShowString(2,9,"C6");

     OLED_ShowNum(1,4,CH[0],4);
     OLED_ShowNum(2,4,CH[1],4);
     OLED_ShowNum(3,4,CH[2],4);
     OLED_ShowNum(4,4,CH[3],4);
     OLED_ShowNum(1,12,CH[4],4);
     OLED_ShowNum(2,12,CH[5],4);

}

// void test()
// {
//      short Acel[3];
//      short Gyro[3];
//      float temp;

//      MPU6050_AccRead(Acel);
//      printf("加速度： %8d %8d %8d\r\n",Acel[0],Acel[1],Acel[2]);

// }






